const fs = require("fs");
const path = require("path");

var dirPath = __dirname;

fs.readdir(dirPath,(err,files)=>{
    if(err){
        console.log(err);
    }else{
        var filePath = path.join(__dirname,"/"+files[0]);
        //删除待定文件
        fs.unlinkSync(filePath);
    }
})